home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Carousel
/
CAROUSEL.cdr
/
mactosh
/
hc
/
hyperscr.sit
/
HyperScribe v0.03
/
background_2663.txt
< prev
next >
Wrap
Text File
|
1988-10-30
|
16KB
|
717 lines
-- background: 2663 from stack: in.03
-- bmap block id: 4144
-- flags: 0000
-- background id: 0
-- name: draftback
----- HyperTalk script -----
on openCard
put the number of this card into background field card_num_display
end openCard
on arrowKey direction
if direction is "left" or direction is "right" then
pass arrowKey
else
get field "dragSpeedDisplay"
if direction is "up" then
add field "dragDelta" to it
else
subtract field "dragDelta" from it
end if
if it < 0 or it > 500 then put 0 into it
put it into field "dragSpeedDisplay"
end if
end arrowKey
on enterKey
watcher "set dragSpeed to" && field "dragSpeedDisplay"
end enterKey
on doMenu menuitem
global watch,exMenuClicked
if exMenuClicked is true then
put false into exMenuClicked
dowatcher "doMenu" && quote & menuitem & quote
get field "CurrentTool"
reactivate it
else
pass doMenu
end if
end doMenu
on reactivate toolName
if toolName is "Select" then
trackSelect true
else
trackTool toolName
end if
end reactivate
on watcher command
global watch
get command
if watch is true then
put command && return after field genscript
end if
end watcher
on dowatcher command
get command
watcher it
do it
end dowatcher
function withinPoint px,py,ux,uy,lx,ly
if (((ux < px and px < lx) or (lx < px and px < ux)) and ((uy < py and py < ly) or (ly < py and py < uy)))
then
return true
else
return false
end if
end withinPoint
function withinRect p,r
return withinPoint(item 1 of p,item 2 of p,item 1 of r, item 2 of r, item 3 of r, item 4 of r)
end withinRect
function within p,ul,lr
return withinPoint(item 1 of p,item 2 of p,item 1 of ul, item 2 of ul, item 1 of lr, item 2 of lr)
end within
function vectorMinus v1,v2
return item 1 of v1 - item 1 of v2 & "," & item 2 of v1 - item 2 of v2
end vectorMinus
function vectorPlus v1,v2
return item 1 of v1 + item 1 of v2 & "," & item 2 of v1 + item 2 of v2
end vectorPlus
on mouseDown
global mouseDownSpot,newToolClicked,exMenuClicked
get the mouseLoc
put it into field "mouseDownSpot"
put it into mouseDownSpot
put withinRect(it,the rect of background button ID 18) into newToolClicked
if newToolClicked is true then
hide background button "pallet hider"
end if
put withinRect(it,the rect of background button ID 19) into exMenuClicked
pass mouseDown
end mouseDown
on mouseUp
global mouseUpSpot
get the mouseLoc
put it into field "mouseUpSpot"
put it into mouseUpSpot
pass mouseUp
end mouseUp
on trackTool toolname
global newToolClicked,exMenuClicked,mouseDownSpot,mouseUpSpot, palletHidden
if palletHidden is true then
show background button "Pallet Hider"
end if
set hilite of bkgnd button "New Tool" to true
put toolname into field "CurrentTool"
put "choose" && toolname && "tool" into chooser
repeat
repeat until the mouse is down
set the cursor to 2
end repeat
mouseDown
if newToolClicked is true then exit repeat
if exMenuClicked is true then exit trackTool
repeat until the mouse is up
do chooser
drag from field "mouseDownSpot" to the mouseLoc
doMenu "Undo"
end repeat
mouseUp
dowatcher chooser
dowatcher "drag from" && field "mouseDownSpot" && "to" && field "mouseUpSpot"
end repeat
set hilite of bkgnd button "New Tool" to false
choose browse tool
end trackTool
on trackSelect reenter
-- reenter is true when called from a doMenu handler
global upperLeft,lowerRight,newToolClicked,exMenuClicked, mouseDownSpot,mouseUpSpot,PalletHidden
if palletHidden is true then
show background button "Pallet Hider"
end if
set hilite of bkgnd button "New Tool" to true
put "Select" into field "CurrentTool"
if reenter <> true then
put "0,0" into upperLeft
put upperLeft into lowerRight
end if
repeat
repeat until the mouse is down
set the cursor to 2
end repeat
mouseDown
if newToolClicked is true then exit repeat
if exMenuClicked is true then exit trackSelect
if within(mouseDownSpot,upperLeft,lowerRight) then
put mouseDownSpot into formerLoc
repeat until the mouse is up
get the mouseLoc
drag from formerLoc to it
put it into formerLoc
end repeat
mouseUp
watcher "drag from" && mouseDownSpot && "to" && mouseUpSpot
get vectorMinus(mouseUpSpot,mouseDownSpot)
put vectorPlus(upperLeft,it) into upperLeft
put vectorPlus(lowerRight,it) into lowerRight
else
put mouseDownSpot into upperLeft
repeat until the mouse is up
choose rectangle tool
drag from mouseDownSpot to the mouseLoc
doMenu "Undo"
end repeat
mouseUp
put mouseUpSpot into lowerRight
get field "dragSpeedDisplay"
if it > 0 then
watcher "set dragSpeed to 0"
end if
dowatcher "choose select tool"
dowatcher "drag from" && upperLeft && "to" && lowerRight
if it > 0 then
watcher "set dragSpeed to" && it
end if
end if
end repeat
set hilite of bkgnd button "New Tool" to false
choose browse tool
end trackSelect
-- part 1 (field)
-- low flags: 00
-- high flags: 0007
-- rect: left=14 top=24 right=266 bottom=226
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: genscript
-- part 2 (button)
-- low flags: 00
-- high flags: A003
-- rect: left=28 top=319 right=341 bottom=105
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Ignoring
----- HyperTalk script -----
on mouseUp
global watch
if watch is "true" then
put "false" into watch
set name of bkgnd button id 2 to "Ignoring"
else
put "true" into watch
set name of bkgnd button id 2 to "Recording"
end if
end mouseUp
on mouseDown
end mouseDown
-- part 3 (button)
-- low flags: 00
-- high flags: A003
-- rect: left=266 top=319 right=340 bottom=353
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Show Pallet
----- HyperTalk script -----
on mouseUp
global PalletHidden
get PalletHidden
if it is true then
hide bkgnd button "Pallet Hider"
set name of bkgnd button id 3 to "Hide Pallet"
put false into PalletHidden
else
show bkgnd button "Pallet Hider"
set name of bkgnd button id 3 to "Show Pallet"
put true into PalletHidden
end if
end mouseUp
on mouseDown
end mouseDown
-- part 6 (button)
-- low flags: 00
-- high flags: A003
-- rect: left=179 top=319 right=341 bottom=263
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Show Script
----- HyperTalk script -----
on mouseUp
get visible of bkgnd button "Script Hider"
if it is true then
hide bkgnd button "Script Hider"
set name of bkgnd button id 6 to "Hide Script"
else
show bkgnd button "Script Hider"
set name of bkgnd button id 6 to "Show Script"
end if
end mouseUp
on mouseDown
end mouseDown
-- part 10 (button)
-- low flags: 00
-- high flags: 2000
-- rect: left=307 top=44 right=65 bottom=330
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Fake Browse
----- HyperTalk script -----
on mouseUp
end mouseUp
on mouseDown
global palletHidden
put "Browse" into field "CurrentTool"
if palletHidden is true then
show background button "pallet hider"
end if
dowatcher "choose browse tool"
end mouseDown
-- part 11 (button)
-- low flags: 00
-- high flags: 2000
-- rect: left=306 top=70 right=91 bottom=329
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Fake Select
----- HyperTalk script -----
on mouseUp
trackSelect false
end mouseUp
on mouseDown
end mouseDown
-- part 12 (field)
-- low flags: 00
-- high flags: 0002
-- rect: left=49 top=272 right=287 bottom=122
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: mouseDownSpot
-- part 14 (field)
-- low flags: 00
-- high flags: 0002
-- rect: left=386 top=190 right=208 bottom=456
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: CurrentTool
-- part 13 (field)
-- low flags: 00
-- high flags: 0002
-- rect: left=145 top=272 right=287 bottom=222
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: mouseUpSpot
-- part 16 (button)
-- low flags: 00
-- high flags: 2000
-- rect: left=329 top=111 right=132 bottom=352
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Fake Rectangle
----- HyperTalk script -----
on mouseUp
trackTool "Rectangle"
end mouseUp
on mouseDown
end mouseDown
-- part 17 (button)
-- low flags: 00
-- high flags: 2000
-- rect: left=353 top=90 right=111 bottom=376
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Fake Line
----- HyperTalk script -----
on mouseUp
trackTool "Line"
end mouseUp
on mouseDown
end mouseDown
-- part 18 (button)
-- low flags: 00
-- high flags: A003
-- rect: left=355 top=318 right=340 bottom=424
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: New Tool
----- HyperTalk script -----
on mouseUp
hide bkgnd button "Pallet Hider"
end mouseUp
-- part 19 (button)
-- low flags: 00
-- high flags: A003
-- rect: left=427 top=318 right=339 bottom=480
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Menu
-- part 20 (button)
-- low flags: 00
-- high flags: A003
-- rect: left=108 top=320 right=341 bottom=173
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Playback
----- HyperTalk script -----
on mouseUp
global watch
put watch into origWatch
put the number of lines in field "genScript" into doCount
repeat with lineNum = 1 to doCount
do line lineNum of field "genScript"
end repeat
put origWatch into watch
choose browse tool
end mouseUp
on mouseDown
end mouseDown
-- part 21 (field)
-- low flags: 00
-- high flags: 0002
-- rect: left=299 top=269 right=286 bottom=327
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: DragSpeedDisplay
-- part 25 (field)
-- low flags: 00
-- high flags: 0002
-- rect: left=423 top=213 right=229 bottom=456
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: DragDelta
-- part 26 (button)
-- low flags: 00
-- high flags: 8000
-- rect: left=330 top=268 right=289 bottom=495
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Drag Speed (Enter to set)
-- part 27 (button)
-- low flags: 00
-- high flags: 8000
-- rect: left=338 top=213 right=233 bottom=420
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Drag Delta
-- part 28 (button)
-- low flags: 00
-- high flags: 8003
-- rect: left=413 top=237 right=262 bottom=455
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Full
----- HyperTalk script -----
on mouseUp
put 0 into field "DragSpeedDisplay"
send enterKey to background
end mouseUp
-- part 31 (button)
-- low flags: 00
-- high flags: 0000
-- rect: left=485 top=317 right=341 bottom=511
-- title width / last selected line: 0
-- icon id / first selected line: 25002 / 25002
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Go To Help
----- HyperTalk script -----
on mouseUp
go to card id 4765
end mouseUp
-- part 34 (button)
-- low flags: 00
-- high flags: 8003
-- rect: left=306 top=238 right=263 bottom=348
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Slow
----- HyperTalk script -----
on mouseUp
put 40 into field "DragSpeedDisplay"
send enterKey to background
end mouseUp
-- part 35 (button)
-- low flags: 00
-- high flags: 8003
-- rect: left=359 top=238 right=263 bottom=401
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Med
----- HyperTalk script -----
on mouseUp
put 150 into field "DragSpeedDisplay"
send enterKey to background
end mouseUp
-- part 36 (button)
-- low flags: 00
-- high flags: 8000
-- rect: left=301 top=189 right=209 bottom=383
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Current Tool
-- part 32 (button)
-- low flags: 00
-- high flags: 2000
-- rect: left=330 top=132 right=153 bottom=353
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Fake Oval
----- HyperTalk script -----
on mouseUp
trackTool "Oval"
end mouseUp
on mouseDown
end mouseDown
-- part 4 (button)
-- low flags: 00
-- high flags: 0001
-- rect: left=275 top=23 right=301 bottom=502
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Pallet Hider
-- part 37 (button)
-- low flags: 00
-- high flags: 0001
-- rect: left=4 top=7 right=316 bottom=265
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: script hider
-- part 38 (field)
-- low flags: 01
-- high flags: 0004
-- rect: left=2 top=317 right=340 bottom=27
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: card_num_display